<?php
class PHPExcelChunkReadFilter implements PHPExcel_Reader_IReadFilter
{
    private $_startRow = 0;     // 开始行  
    private $_endRow = 0;       // 结束行  


    // 定义了一个读去指定范围行的方法
    public function setRows($startRow, $chunkSize) {
        $this->_startRow = $startRow;
        $this->_endRow       = $startRow + $chunkSize;
    }

    public function readCell($column, $row, $worksheetName = '') {
        if (($row == 1) || ($row >= $this->_startRow && $row < $this->_endRow)) {
            return true;
        }
        
        return false;
    }
}
